package abstract1;

public class Dog extends Animal {
    private String type;//狗的品种
    public Dog(String name, String type) {
        super(name);
        this.type=type;
    }

    @Override
    public void bark() {
        System.out.println("汪汪！！");
    }

    @Override
    public String toString() {
        return type+getName();
    }
}
